import request from '@/utils/request'

// 查询理货报告报文记录列表
export function listMessage(query) {
  return request({
    url: '/manifest/tally/message/list',
    method: 'get',
    params: query
  })
}

// 查询报文回执记录
export function listResultMessage(query) {
  return request({
    url: '/manifest/tally/message/getResults',
    method: 'get',
    params: query
  })
}

// 查询理货报告报文记录详细
export function getMessage(id) {
  return request({
    url: '/manifest/tally/message/' + id,
    method: 'get'
  })
}

// 申报理货报告
export function declareTallyMessage(ids) {
  return request({
    url: '/manifest/tally/message/declare/' + ids,
    method: 'put'
  })
}

// 新增理货报告报文记录
export function addMessage(data) {
  return request({
    url: '/manifest/tally/message',
    method: 'post',
    data: data
  })
}

// 修改理货报告报文记录
export function updateMessage(data) {
  return request({
    url: '/manifest/tally/message',
    method: 'put',
    data: data
  })
}

// 删除理货报告报文记录
export function delMessage(id) {
  return request({
    url: '/manifest/tally/message/' + id,
    method: 'delete'
  })
}

// 导出理货报告报文记录
export function exportMessage(query) {
  return request({
    url: '/manifest/tally/message/export',
    method: 'get',
    params: query
  })
}

// 申请删除理货报告报文记录
export function declDelMessage(data) {
  return request({
    url: '/manifest/tally/message/declDelete',
    method: 'post',
    data: data
  })
}
